home *** CD-ROM | disk | FTP | other *** search
/ Mac Expert 1995 Winter / Mac Expert - Winter 95.iso / Les fichiers / Communications / Internet / TurboTCP 2.1 ƒ / PP helper classes / CTCPApplicationPP.h < prev    next >
Encoding:
Text File  |  1995-01-19  |  1.7 KB  |  59 lines  |  [TEXT/MMCC]

  1. //
  2. // CTCPApplicationPP.h
  3. //
  4. //    TurboTCP library
  5. //    Application mix-in class
  6. //    PowerPlant-specific class
  7. //
  8. //    Copyright © 1993-95, FrostByte Design / Eric Scouten
  9. //
  10.  
  11. #pragma once
  12.  
  13. #include "TurboTCP.buildflags.h"
  14.  
  15. #if !TurboTCP_PP
  16.     #error: This file should be used with PowerPlant projects only!
  17. #endif
  18.  
  19. #include <LAttachment.h>
  20. class LApplication;
  21.  
  22.  
  23. //***********************************************************
  24.  
  25. class CTCPApplicationPP : public LAttachment {
  26.  
  27. //    This mix-in class should be used with an LApplication or LDocApplication. It hooks
  28. //    into the event loop to handle MacTCP events which were queued at interrupt time, and
  29. //    takes care of opening and closing the MacTCP driver at the appropriate times.
  30.  
  31. //    NOTE: It is highly recommended that you enable background processing by turning on
  32. //    the “Background Null Events” SIZE resource flag. See the Set Project Type… dialog
  33. //    under the Project menu.
  34.  
  35. //    By default, TurboTCP sets the maximum sleep time to 90 ticks (1.5 seconds). Feel free
  36. //    to modify this behavior. However, I recommend that you use a setting somewhat lower
  37. //    than TCL’s default of 600 ticks (10 seconds). You may wish to use a lower value for
  38. //    high-performance applications, or a higher value to be more MultiFinder-friendly.
  39.  
  40.     
  41. public:
  42.                     CTCPApplicationPP(LApplication* inApplication);
  43.     virtual            ~CTCPApplicationPP();
  44.  
  45.     // event-loop tap
  46.  
  47. protected:
  48.     virtual void        ExecuteSelf(MessageT inMessage, void* ioParam);
  49.  
  50.  
  51.     // data members
  52.  
  53.     LApplication*        mApplication;                    // the application object we’re attached to
  54.     short            mMaxTCPEvents;                // maximum number of TCP events to process
  55.     long                mMaxTCPTicks;                // maximum ticks to spend in TCP event loop
  56.  
  57.  
  58. };
  59.